<template>
  <div>
    <p>计数器：{{count}},{{store.doubleCount}}</p>
    <a-button type="primary" @click="handleIncrement">++</a-button>
    <a-pagination v-model:current="current" :total="51"
        :pageSizeOptions="[5,10,15,20]"
     />
  </div>
</template>

<script setup>
import useCountStore from '../store/index';
import {storeToRefs} from 'pinia';
import {ref} from 'vue';

const current = ref(1);
const store = useCountStore();
const {count} = storeToRefs(store);

function handleIncrement(){
    store.count++;
    // store.increment(10);
    // count.value++;
}
</script>

<style>

</style>